@layout("/common/_form.html",{js:["/assets/coupon/coupon_add.js"],css:["/assets/expand/module/formSelects/formSelects-v4.css"]}){
<style>
    .layui-upload-img {
        height: 100px;
        width: 100px;
        object-fit: contain;
        background-color: #dddddd;
    }
</style>
<form class="layui-form" id="couponForm" lay-filter="couponForm">
    <div class="layui-fluid" style="padding-bottom: 75px;">
        <div class="layui-card">
            <div class="layui-card-header">基本信息</div>
            <div class="layui-card-body">
                <div class="layui-form-item layui-row">
                    <input name="id" type="hidden"/>

                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">企业图片<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="companyPic" name="company" type="hidden" class="layui-input" lay-verify="required"/>
                            <div class="layui-upload">
                                <button type="button" class="layui-btn" id="company">图片上传</button>
                                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                    预览图：
                                    <div class="layui-upload-list" id="companyview"></div>
                                </blockquote>
                            </div>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">账号<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="account" name="account" placeholder="请输入账号" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">优惠券名称<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="couponName" name="couponName" placeholder="请输入优惠券名称" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">优惠内容<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="preferentialContent" name="preferentialContent" placeholder="请输入优惠内容" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">详情<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="detail" name="detail" placeholder="请输入详情" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">适用地址<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="generalAddress" name="generalAddress" placeholder="请输入适用地址" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">总数量<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="quantity" name="quantity" placeholder="请输入总数量" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">剩余数量<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="remainingQuantity" name="remainingQuantity" placeholder="请输入剩余数量" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">有效期<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="valid" name="valid" placeholder="请输入有效期" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">开始时间<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="startTime" name="startTime" placeholder="请输入开始时间" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md6">
                        <label class="layui-form-label">结束时间<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="endTime" name="endTime" placeholder="请输入结束时间" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">券图片<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="picPic" name="pic" type="hidden" class="layui-input" lay-verify="required"/>
                            <div class="layui-upload">
                                <button type="button" class="layui-btn" id="pic">图片上传</button>
                                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                    预览图：
                                    <div class="layui-upload-list" id="picview"></div>
                                </blockquote>
                            </div>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">券类型<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input name="type" title="限量券"  type="radio" value="0" lay-verify="required" required/>
                            <input name="type" title="每日更新券"  type="radio" value="1" lay-verify="required" required/>
                            <input name="type" title="外链"  type="radio" value="2" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">外链地址<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="externalLink" name="externalLink" placeholder="请输入当类型为外链时，填写外链地址" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">券码类型<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input name="status" title="内部码"  type="radio" value="0" lay-verify="required" required/>
                            <input name="status" title="外部码"  type="radio" value="1" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">开始时分<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="beginTime" name="beginTime" placeholder="请输入开始时间" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">结束时分<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="finishTime" name="finishTime" placeholder="请输入结束时间" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group-bottom text-center">
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;提交&emsp;</button>
        <button type="reset" class="layui-btn layui-btn-primary" id="cancel">&emsp;取消&emsp;</button>
    </div>

</form>

@}